package com.fashiontextile.user.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;

/**
 * 用户
 */
@Data
public class User{

    private Long uid;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private String password;

    /**
     * 用户角色
     */
    private Role role;

    /**
     * 头像链接
     */
    private String avatar;

    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date regtime;

    /**
     * 启用状态
     */
    private boolean enable;
}